:root {
  --body-background-color: #333333;
  --main-text-color: #ffffff;
  --main-text-grey-color: #eeeeee;
  --main-text-hover-color: #555555;
  --main-background-color: #00000040;
  --main-background-light-color: #ffffff30;
  --main-background-hover-color: #ffffff70;
  --main-input-hover-color: #ffffff;
  --main-notification-background-color: #00000030;
  --main-box-shadow: 0px 0px 10px 0px #00000020;
  --main-text-shadow: 0px 0px 8px #00000066;
}

[theme="dark"] {
  --main-text-color: #efefef;
  --main-background-light-color: #00000030;
  --main-background-hover-color: #00000040;
}

* {
  margin: 0;
  padding: 0;
  user-select: none;
}

html,
body {
  width: 100%;
  height: 100%;
  background-color: var(--body-background-color);
  overflow: hidden;
  font-family: "HarmonyOS_Regular", sans-serif;
}

#app {
  width: 100vw;
  height: 100vh;
}

// NButton
.n-button {
  background-color: var(--main-background-light-color);
  border-radius: 8px;
  transition: background-color 0.3s;
}

// NMessage
.n-message-container {
  top: 20px !important;
  .n-message-wrapper {
    border-radius: 25px;
    backdrop-filter: blur(20px);
    .n-message {
      padding: 12px 28px;
      border-radius: 25px;
      background-color: var(--main-background-light-color);
      color: var(--main-text-color);
      .n-message__icon > * {
        color: var(--main-text-color);
      }
    }
  }
}

// NTabs
.n-tabs {
  height: 100%;
  --n-bar-color: var(--main-text-color) !important;
  --n-tab-text-color-active: var(--main-text-color) !important;
  --n-tab-text-color-hover: var(--main-text-color) !important;
  .n-tabs-nav {
    height: 44px;
  }
  .n-tabs-pane-wrapper {
    height: 100%;
    .n-tab-pane {
      padding: 20px;
      box-sizing: border-box;
      &.no-padding {
        padding: 0;
      }
    }
  }
}

// NSwitch
.n-switch {
  --n-rail-color: var(--main-background-light-color) !important;
  --n-rail-color-active: var(--main-background-hover-color) !important;
  --n-box-shadow-focus: var(--main-box-shadow) !important;
}

// NScrollbar
.n-scrollbar {
  .n-scrollbar-rail {
    right: 0 !important;
  }
}

// NModal
.n-modal-container {
  .n-modal-mask {
    backdrop-filter: blur(40px);
  }
  // n-dialog
  .n-dialog {
    border-radius: 8px;
    box-shadow: none;
    --n-icon-color: var(--main-text-color);
    --n-color: var(--main-background-light-color);
    .n-dialog__title {
      font-weight: bold;
      font-size: 18px;
      .n-dialog__icon {
        font-size: 24px;
        margin-right: 8px;
      }
    }
    .n-dialog__content {
      font-size: 15px;
    }
    .n-button {
      height: auto;
      padding: 9px 16px;
      transition: background-color 0.3s;
      --n-border: none;
      --n-border-hover: none;
      --n-border-focus: none;
      --n-border-pressed: none;
      --n-text-color-pressed: var(--main-text-color);
      --n-color-pressed: var(--main-background-hover-color);
      --n-text-color: var(--main-text-color);
      --n-text-color-hover: var(--main-text-color);
      --n-color-focus: var(--main-background-hover-color);
      --n-text-color-focus: var(--main-text-color);
      --n-color-hover: var(--main-background-hover-color);
    }
  }
  .n-modal {
    width: 60vw;
    max-width: 700px;
    min-width: min(24rem, 100vw);
    border-radius: 8px;
    box-shadow: none;
    --n-color-modal: var(--main-background-light-color);
  }
}

// NDropdown
.n-dropdown {
  --n-border-radius: 8px !important;
  --n-color: var(--main-background-light-color) !important;
  --n-option-color-hover: var(--main-background-hover-color) !important;
  backdrop-filter: blur(10px);
}

// Transition 动画
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.25s ease-in-out;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

.fadeDown-enter-active,
.fadeDown-leave-active {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.fadeDown-enter-active {
  transition-delay: 0.2s;
}

.fadeDown-enter-from,
.fadeDown-leave-to {
  opacity: 0;
  transform: translateY(-10px);
}

.show-enter-active,
.show-leave-active {
  transition: opacity 0.25s ease, transform 0.25s ease-in-out;
}

.show-enter-from,
.show-leave-to {
  opacity: 0;
  transform: translateY(20px);
}

// 全局动画
@keyframes fade-up-in {
  0% {
    opacity: 0;
  }
  30% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-time-in {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 0;
    transform: translateY(-90px);
  }
  100% {
    opacity: 1;
    transform: translateY(-140px);
  }
}

@keyframes fade-blur-in {
  from {
    filter: blur(calc(var(--blur) + 20px)) brightness(0.4);
    transform: scale(1.5);
  }
  to {
    filter: blur(var(--blur)) brightness(1);
    transform: scale(1.2);
  }
}

@keyframes separator-breathe {
  0% {
    opacity: 0.8;
  }
  70% {
    opacity: 0.8;
  }
  100% {
    opacity: 0.2;
  }
}

@keyframes logo-breathe {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

// 文本选中
::selection {
  color: var(--main-text-color);
  background-color: var(--main-text-hover-color);
}

// 滚动条
.ps__rail-y {
  .ps__thumb-y {
    right: 0;
    background-color: var(--main-background-light-color);
  }
}
